home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
126-150
/
disk_146
/
dmemacros
/
commentedmacros
/
pascal.ifelse.edrc
< prev
next >
Wrap
Text File
|
1992-05-06
|
2KB
|
46 lines
# insert lines for body of text; write marker in text to save location;
# move cursor up one line (may have to add a line if at the top) and move
# to the first character in the line (if there are no characters in the
# line, the cursor moves to the leftmost column;
repeat 7 insline `+' up firstnb
# if there is text on this line, insert a line between this line and the
# first line of the template;
if c>32 `down insline' down
# go down to end of template and insure that there is at least one blank
# line between it and any text below it;
repeat 7 down firstnb
if c>32 insline
# move back to marker and delete it;
repeat 7 up firstnb del
# write the body of the template; write 2 markers for later search & replace
# needed to complete comments with test expression; place cursor in position
# to write between parentheses in test expression;
`IF () THEN BEGIN' firstnb down down
`END (* IF + *)' firstnb down down
`ELSE BEGIN' firstnb down down
`END; (* ELSE + *)' findstr `) THEN' prev
# prompt for the test expression (it will printed as a string at the cursor
# location; goto first character of the expression and read text into the
# variable $scanf until you get to a blank; replace the markers in the
# comments with the text in $scanf; move to blank line between first BEGIN-
# END pair and indent for entry of next line of code;
escimm (` ) first find `(' right while c<=32 right scanf %s down findr `+' $scanf down findr `+' $scanf up up up up firstnb up tab